package com.wgo.precise.client.ui.view.util;

import java.util.Collection;

import org.eclipse.ui.views.properties.IPropertyDescriptor;

import com.wgo.precise.client.ui.model.AbstractPropertySpesification;
import com.wgo.precise.client.ui.model.facade.IPropertiesContainer;


/**
 * @author petterei
 *
 * @version $Id: GenericModelPropertySource.java,v 1.1 2006-01-23 19:58:37 petterei Exp $
 */
public class GenericModelPropertySource extends ModelItemPropertySource {
	
	private Collection<AbstractPropertySpesification> list;
	private String category = null; //"Properties";
	public GenericModelPropertySource(IPropertiesContainer item, Collection<AbstractPropertySpesification> list, String category) {
		super(item);
		this.list = list;
		if (null != category && category != "" ) {
			this.category = category;
		}
	}

	@Override
	public IPropertyDescriptor[] getPropertyDescriptors() {
        return createPropertyDescriptors(list, category);
	}

}
